package pro.spring.inter;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import pro.spring.model.Udiscusser;

public interface UdiscusserMapper {
    int deleteByPrimaryKey(Integer drId);

    int insert(Udiscusser record);

    int insertSelective(Udiscusser record);

    Udiscusser selectByPrimaryKey(Integer drId);

    int updateByPrimaryKeySelective(Udiscusser record);

    int updateByPrimaryKeyWithBLOBs(Udiscusser record);

    int updateByPrimaryKey(Udiscusser record);
    
    int selectNewId();//得到最新的id
    
    //分页查询
    List<Udiscusser> selectListPage(@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    
    //最热查询began
    List<Udiscusser> selectByNow(@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCount();
    //最热查询end
    
    //我参与的查询began
    List<Udiscusser> selectByCanyu(@Param("uId")Integer uId,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCountByCanyu(@Param("uId")Integer uId);
    //我参与的查询end
    

    //线下审批  未处理的线下申请->3，未通过线下交流申请->4，已通过的线下交流申请 ->5 began
    List<Udiscusser> selectByXianxia(@Param("drtype")Integer type,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCountByXianxia(@Param("drtype")Integer type);
    //end
    
    //最热查询+by key began
    List<Udiscusser> selectByKey(@Param("key")String key,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCountByKey(@Param("key")String key);
    //最热查询+by key end
    
    //查找 by uid began
    List<Udiscusser> selectByUid(@Param("uId")Integer uid,@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCountByUid(@Param("uId")Integer uId);
    //查找 by uid end
    
    Udiscusser selectByDis(@Param("drId")Integer drId);
    
    //线下交流会前台
    List<Udiscusser> selectXianxia(@Param("offset")Integer offset,@Param("pagesize")Integer pagesize);
    Integer selectCountByXianxiaa();
    //最热查询+by key end
}